@if (shouldRun) {
  <mat-sidenav-container class="example-container">
    <mat-sidenav #sidenav mode="side" [(opened)]="opened" (opened)="events.push('open!')"
                (closed)="events.push('close!')">
      Sidenav content
    </mat-sidenav>

    <mat-sidenav-content>
      <p><mat-checkbox [(ngModel)]="opened">sidenav.opened</mat-checkbox></p>
      <p><button matButton (click)="sidenav.toggle()">sidenav.toggle()</button></p>
      <p>Events:</p>
      <div class="example-events">
        @for (e of events; track e) {
          <div>{{e}}</div>
        }
      </div>
    </mat-sidenav-content>
  </mat-sidenav-container>
} @else {
  <div>Please open on Stackblitz to see result</div>
}

